<?php

Class Teacher
{
    private $age;
    private $sex;
    private $name;

    public function show()
    {
        echo "我是".$this->name.",".$this->sex.",".$this->age."岁,老师"."<br>";
    }

    public function __set($name, $value)
    {
        $this->$name=$value;
    }

    public function __get($name)
    {
        return $this->$name;
    }
}